//
//  MineModel.m
//  吃货·上海
//
//  Created by 高青松 on 15/11/27.
//  Copyright © 2015年 濮亚军. All rights reserved.
//

#import "MineModel.h"

@implementation MineModel
/*
+(MineModel *)shareMineModel
{
    static MineModel *mineModel = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        mineModel = [[MineModel alloc]init];
    });
    return mineModel;
}
*/
- (instancetype)initWithUserModel:(BmobUser *)bUser
{
    self = [super init];
    if (self) {
        self.userName = [bUser objectForKey:@"username"];
        self.userPW = [bUser objectForKey:@"password"];
        self.userPhone = [bUser objectForKey:@"mobilePhoneNumber"];
        self.userEmail = [bUser objectForKey:@"email"];
        self.userSex = [bUser objectForKey:@"userSex"];
        self.sign = [bUser objectForKey:@"sign"];
        BmobFile *file = [bUser objectForKey:@"icon"];
        self.userImageStr = file.url;
        
        /*
        if ([bUser objectForKey:@"otherName"]) {
            self.otherName = [bUser objectForKey:@"otherName"];
        }
        else if ([bUser objectForKey:@"otherName"] == nil)
        {
            self.otherName = [bUser objectForKey:@"username"];

        }
         */
    }
    return self;
}
@end
